package br.com.single.modelo.estoque;

import br.com.single.publico.Cdfilial;
import br.com.single.publico.Cditemtabelageneri;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import org.springframework.roo.addon.dbre.RooDbManaged;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
import org.springframework.roo.addon.tostring.RooToString;

@Entity
@Table(schema = "estoque",name = "mvnotafiscal")
@RooJavaBean
@RooToString
@RooJpaActiveRecord(versionField = "", table = "mvnotafiscal", schema = "estoque")
@RooDbManaged(automaticallyDelete = true)
public class Mvnotafiscal {

	
	
	@Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "sequenmovime")
    private Integer id;
	
	@OneToOne
    @JoinColumn(name = "sequenmovime", nullable = false, insertable = false, updatable = false)
    private Mvmovimeestoqu mvmovimeestoqu;

	@ManyToOne
    @JoinColumn(name = "cfop", referencedColumnName = "codigocfop",columnDefinition="cfop")
    private Cdnatureoperac cfop;

	@ManyToOne
    @JoinColumn(name = "filial", referencedColumnName = "codigofilial",columnDefinition="codigonumero")
    private Cdfilial filial;

	@ManyToOne
    @JoinColumns({ @JoinColumn(name = "tabelamd", referencedColumnName = "codigotabela",columnDefinition="bpchar"), @JoinColumn(name = "modelodocume", referencedColumnName = "elementabela",columnDefinition="bpchar") })
    private Cditemtabelageneri cditemtabelageneri;

	@Column(name = "seriedocume",columnDefinition="classisimple")
    private String seriedocume;

	@Column(name = "subseriedocume",columnDefinition="classisimple")
    private String subseriedocume;

	@Column(name = "numerodocume",columnDefinition="int4")
    private Integer numerodocume;

	@Column(name = "serieselofiscal",columnDefinition="classisimple")
    private String serieselofiscal;

	@Column(name = "subserieselofiscal",columnDefinition="classisimple")
    private String subserieselofiscal;

	@Column(name = "numeroselofiscal",columnDefinition="int4")
    private Integer numeroselofiscal;

	@Column(name = "numeroformulinicio",columnDefinition="int4")
    private Integer numeroformulinicio;

	@Column(name = "numeroformulfim",columnDefinition="int4")
    private Integer numeroformulfim;

	@Column(name = "chavenfe",columnDefinition="chavenfe")
    private String chavenfe;

	public Mvmovimeestoqu getMvmovimeestoqu() {
        return mvmovimeestoqu;
    }

	public void setMvmovimeestoqu(Mvmovimeestoqu mvmovimeestoqu) {
        this.mvmovimeestoqu = mvmovimeestoqu;
    }

	public Cdnatureoperac getCfop() {
        return cfop;
    }

	public void setCfop(Cdnatureoperac cfop) {
        this.cfop = cfop;
    }

	public Cdfilial getFilial() {
        return filial;
    }

	public void setFilial(Cdfilial filial) {
        this.filial = filial;
    }

	public Cditemtabelageneri getCditemtabelageneri() {
        return cditemtabelageneri;
    }

	public void setCditemtabelageneri(Cditemtabelageneri cditemtabelageneri) {
        this.cditemtabelageneri = cditemtabelageneri;
    }

	public String getSeriedocume() {
        return seriedocume;
    }

	public void setSeriedocume(String seriedocume) {
        this.seriedocume = seriedocume;
    }

	public String getSubseriedocume() {
        return subseriedocume;
    }

	public void setSubseriedocume(String subseriedocume) {
        this.subseriedocume = subseriedocume;
    }

	public Integer getNumerodocume() {
        return numerodocume;
    }

	public void setNumerodocume(Integer numerodocume) {
        this.numerodocume = numerodocume;
    }

	public String getSerieselofiscal() {
        return serieselofiscal;
    }

	public void setSerieselofiscal(String serieselofiscal) {
        this.serieselofiscal = serieselofiscal;
    }

	public String getSubserieselofiscal() {
        return subserieselofiscal;
    }

	public void setSubserieselofiscal(String subserieselofiscal) {
        this.subserieselofiscal = subserieselofiscal;
    }

	public Integer getNumeroselofiscal() {
        return numeroselofiscal;
    }

	public void setNumeroselofiscal(Integer numeroselofiscal) {
        this.numeroselofiscal = numeroselofiscal;
    }

	public Integer getNumeroformulinicio() {
        return numeroformulinicio;
    }

	public void setNumeroformulinicio(Integer numeroformulinicio) {
        this.numeroformulinicio = numeroformulinicio;
    }

	public Integer getNumeroformulfim() {
        return numeroformulfim;
    }

	public void setNumeroformulfim(Integer numeroformulfim) {
        this.numeroformulfim = numeroformulfim;
    }

	public String getChavenfe() {
        return chavenfe;
    }

	public void setChavenfe(String chavenfe) {
        this.chavenfe = chavenfe;
    }

	

	public Integer getId() {
        return this.id;
    }

	public void setId(Integer id) {
        this.id = id;
    }
}
